package testmysql.mysql;

import java.util.List;

import org.apache.log4j.Logger;
import org.nutz.dao.Dao;
import org.nutz.dao.impl.NutDao;
import org.nutz.log.Log;
import org.nutz.log.Logs;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * 
 * 通过redis测试对数据的缓存效果. 以及验证需要的内存大小.
 * 
 */
@SuppressWarnings("all")
public class TbInit {

	private static final Log logger = Logs.get();

	public static void main(String[] args) {
		DruidDataSource ds = new DruidDataSource();
		ds.setUsername("root");
		ds.setPassword("root");
		ds.setUrl("jdbc:mysql://127.0.0.1:3306/db_test?charachterEncoding=UTF-8;");

		final Dao dao = new NutDao(ds);
		dao.create(t_log.class, true);
		
		
		for (int i = 1; i <= 200; i++) {
			dao.fastInsert(t_log.me_1w());
			logger.debug(i);
		}

	}

}
